﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace docmgr.WinForm
{
    public partial class PrintOffset : Form
    {
        public PrintOffset()
        {
            InitializeComponent();
            xoffset.Text = Common.xoffset.ToString();
            yoffset.Text = Common.yoffset.ToString();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string currentPath = AppDomain.CurrentDomain.BaseDirectory;
            string exepath = currentPath + "conf.ini";
            IniFile ini = new IniFile(exepath);

            ini.WriteInivalue("打印", "xoffset", xoffset.Text);
            ini.WriteInivalue("打印", "yoffset", yoffset.Text);

            MessageBox.Show("偏移量设置成功!");
            this.Close();
        }
    }
}
